package com.common.util;

public interface Constants {
	

	public static final int INTERVAL = 5; // 5 minutes.
	public static final int BREAK_TIME = 60; // 15 minutes.
	
	//Time format.
    public static final String FORMAT_TIME_1 = "yyyyMMddHHmmss";
    public static final String FORMAT_TIME_2 = "MM/dd HH:mm";
    public static final String FORMAT_TIME_3 = "yyyy/MM/dd";

    //Punctuation marks
    public static final String MARKS_DASH = "-";
    public static final String MARKS_COMMA = ",";
    public static final String MARKS_WHILE_SPACE = " ";
    
    public final static String STRING_EMPTY = "";
    
    //Linux/Unix/Mac - Line Feed
    public static final String MARKS_UNIX_LF = "\n";
    public static final String MARKS_WIN_LF = "\r\n";
    
    //SQL Log File suffix
    public static final String FILE_NAME_SQL_RESULT = "result.log";

    public static final String REGEX_PHONE = "^((d{3,4})|d{3,4}-)?d{7,8}$";
    public static final String REGEX_EMAIL = "^w+[-+.]w+)*@w+([-.]w+)*.w+([-.]w+)*$";
    public static final String REGEX_URL = "^http://([w-]+.)+[w-]+(/[w- ./?%&=]*)?$";
    public static final String REGEX_CHINESE_ONLY = "^[u4e00-u9fa5],{0,}$";  //Can only input Chinese.
    
    public static final String REGEX_DIGIT_ONLY = "^[0-9]*$";
    public static final String REGEX_DIGIT_10_ONLY = "^d{10}$";  //Only input 10 digits.
    public static final String REGEX_HTML_MARK  = "^/< (.*)>.*|< (.*) />/$";
    
    
    
    public static int SM_DB_SET_NUM = 5;
    
    public static int LINK_LIST_COLUMN_NUM = 4;
    
    public static int LINK_LIST_SIZE_DEFAULT = 90;  //It means we get top 60 by default.
    
    
    public static int DURATION_COOKIE_SAVE_MAX = 2419200; //60 * 60 * 24 * 7 * 4 = 2419200, 4 weeks.

    public static final String ERROR_INVALID_PASSWORD = "error.passwordInvalid";
    public static final String ERROR_NOT_LOGIN = "error.notLogin";
    public static final String ERROR_USERNAME_PASSWORD_EMPTY = "error.userName.password.empty";
    
    public static final String ERROR_IS_REQUIRED = "error.isRequired";
    public static final String ERROR_IS_INVALID = "error.isInvalid";
    
    public static final String ACCOUNT_SESSION = "accountSession";
    public static final String ACCOUNT_COOKIE = "accountCookie";
    
    
    //class: com.opensymphony.xwork2.Action: SUCCESS, NONE, ERROR, INPUT, LOGIN.
    public static final String SUBMIT = "submit";
    public static final String LOGOUT = "logout";
    public static final String BACK = "back";
    
    public static final String ADD = "add";
    public static final String DELETE = "delete";
    public static final String UPDATE = "update";
    public static final String LIST = "list";
    
    public static final String FAILED = "failed";
    
    
    public static final String PREFIX_URL = "http://";
    
    public static final int MAX_LINK_TYPE_ID = 9999;
    
    
    //Used for weekly service update.
    public static final String URL_ONLINE_WIKI="http://www.xiaosq.com/wiki/doku.php";
    public static final String ACCOUNT_ONLINE_WIKI = "actv";
    public static final String PASSWORD_ONLINE_WIKI = "P@ssword1";
    public static final String PAGE_PHONE_SETTING = "http://www.xiaosq.com/wiki/doku.php?id=actv:phone-setting";
    
    public static final String URL_WEEKLY_SERVICE = "weeklyServiceURL";
    public static final String ACCOUNT_WEEKLY_SERVICE = "weeklyServiceAccount";
    public static final String PASSWORD_WEEKLY_SERVICE = "weeklyServicePassword";
    
    public static final String PERIOD_WEEKLY_SERVICE = "weeklyServicePeriod";
    public static final String TEMPLATE_WEEKLY_SERVICE = "weeklyServiceTemplate";
    
    public static final int SPACING_INTERVAL = 3000;

}
